<template>
	<view>
		<u-navbar title='管理店铺' :autoBack="true" leftIconColor="#1E272E" bgColor="transparent"
			:titleStyle="{fontWeight:700,fontSize:'32rpx',color:'#1E272E'}"></u-navbar>
		<view class="company">
			<image src="https://renovationcdn.jiachuangnet.com/index/workerIndex/bg.png" class='bg' style=""></image>
			<view style="position: absolute;top:150rpx;left:25rpx;z-index: 1000;width: 700rpx;padding-bottom: 100rpx;">
				<view style="margin:40rpx 0;margin-bottom:15rpx;display: flex;align-items: center;">
					<image style="width: 25rpx;height: 32rpx"
						src="https://renovationcdn.jiachuangnet.com/index/workerIndex/map.png"></image>
					<view @click="provinceShow=true" style="" class="province">{{province1||'全国'}}</view>
					<view class="workerSearch" style="">
						<image style="width: 34rpx;height: 34rpx;"
							src="https://renovationcdn.jiachuangnet.com/index/workerIndex/search.png"></image>
						<u-input @change="deChange" placeholder="请输入您想搜索的内容" style="height: 78rpx;"
							v-model="searchKey"></u-input>
					</view>
					<view v-if="false" style="margin-left: 24rpx;" @click="toPath('notice')">
						<view style="display: flex;justify-content: center">
							<image style="width: 28rpx;height: 28rpx"
								src="https://renovationcdn.jiachuangnet.com/index/workerIndex/news.png"></image>
						</view>

						<view>消息</view>
					</view>
				</view>
				<!-- <u-tabs @click='changeTaskState'
					:activeStyle="{'fontSize':'28rpx','fontWeight':'700','color':'#1e272e'}"
					:inactiveStyle="{'fontSize':'28rpx','fontWeight':'500','color':'#868686'}" :lineColor='color'
					:list="statusList1" :scrollable="true" :current="currentTab"></u-tabs> -->
				<view class="listContent">
					<view v-for="(v,i) in list" :key="i" style="height: 277rpx;" class="listItem" @click="toPathCreateTask(v.assignTaskId)">
						<view class="stateTag" style="">
							<text v-if="v.state == 0&&v.orderStatus==0">待确认</text>
							<text v-if="v.state == 0&&v.orderStatus==2">已确认</text>
							<text v-if="v.state == 0&&v.orderStatus==1">已取消</text>
							<text v-if="v.state == 1">待测量</text>
							<text v-if="v.state == 2">待上传</text>
							<text v-if="v.state == 3">待付款</text>
							<text v-if="v.state == 4">部分付款</text>
							<text v-if="v.state == 5">待开工</text>
							<text v-if="v.state == 6">进行中</text>
							<text v-if="v.state == 8">待验收</text>
							<text v-if="v.state == 9">已验收</text>
							<text v-if="v.state == 7">已逾期</text>
						</view>
						
						<view class="stateBtn btn" v-if="v.state==6||v.state == 7"
							@click.stop="taskProgress(v.assignTaskId,v.brandPartyId)">
							查看进度
						</view>
						
						<view class="flex btn_wrapper" v-if="v.state==8">
							<view class="stateBtn btn11"
								style="background-color: transparent;color: black;border:1px solid  #ccc;box-sizing: border-box;"
								@click.stop="checkAccept(v.assignTaskId,v.state)">
								验收记录
							</view>
							<view class="stateBtn btn11" @click.stop="gotoCheckAccept(v.assignTaskId,v.isCheck)">
								验收
							</view>
						</view>
						
						<view class="flex btn_wrapper" style="right: 160rpx;bottom: 10rpx;" v-if="v.state == 9 && v.notAcceptedProcess > 0">
							<view class="stateBtn btn11"
								style="background-color: transparent;color: black;border:1px solid  #ccc;box-sizing: border-box;"
								@click.stop="checkAccept(v.assignTaskId,v.state)">
								验收记录
							</view>
							<view class="stateBtn btn11" @click.stop="gotoCheckAccept(v.assignTaskId,v.isCheck)">
								验收
							</view>
						</view>
						
						<view class="stateBtn btn" v-if="v.state==10||v.state==9" @click.stop="taskProgress(v.assignTaskId,v.brandPartyId)">
							查看
						</view>

						<view class="cameraBox">
							<!-- <text @click="videoSrcBindFn(v,i)"  style="height: 100%; margin-left: 10rpx;font-size: 24rpx;color: #13989a;text-decoration: underline;">摄像头绑定</text> -->
							<!-- <template v-if="v.serialNumber">
								<text :key="cameraIndex" @click.stop="viewVideoFn(cameraUrl,v.assignName,cameraIndex+1)"
									v-for="(cameraUrl,cameraIndex) in v.serialNumber"
									style="height: 100%; margin-left: 10rpx;font-size: 24rpx;color: #13989a;text-decoration: underline;">摄像头{{cameraIndex+1}}</text>
							</template> -->
						</view>
						
						<view style="position: relative;">
							<image :src="v.storeImg" v-if="v.storeImg"
								style="width:210rpx;height: 220rpx;border-radius: 20rpx;"></image>
							<image v-else src="https://renovationcdn.jiachuangnet.com/index/workerIndex/shop.png"
								style="width:210rpx;height: 220rpx;"></image>
								<view class="stateTag1" v-if="v.brandPartyId==1&&v.storeType==1">
									<text >普通店</text>
								</view>
								<view class="stateTag2" v-if="v.brandPartyId==2&&v.storeType==1">
									<text >加盟店</text>
								</view>
								<view class="stateTag3" v-if="v.storeType==2">
									<text >旗舰店</text>
								</view>
						</view>
						<view style="width:calc(100% - 230rpx);margin-left:20rpx;">
							<view style="font-weight: bold;width: 80%;overflow:hidden;white-space: nowrap;text-overflow:ellipsis;
			font-size: 36rpx;" :style="{'color':v.state == 7 ?'red' :'#1E272E'}">{{v.assignName}}</view>
							<view style="font-weight: 500;margin:20rpx 0 10rpx 0;
			font-size: 28rpx;" :style="{'color':v.state == 7 ?'red' :'#1E272E'}" v-if="v.startTime&&(v.state>5)">
								开始时间：{{v.startTime.split(' ')[0]}}</view>
							<view style="font-weight: 500;margin:10rpx 0 10rpx 0;
			font-size: 28rpx;color: 1E272E;" v-if="v.checkTime&&(v.state>8)">验收时间：{{v.checkTime.split(' ')[0]}}</view>
							<view style="font-weight: 500;margin:10rpx 0 10rpx 0;
			font-size: 28rpx;color: 1E272E;" v-if="v.confirmTime&&(v.state==8)">完成时间：{{v.confirmTime.split(' ')[0]}}</view>
							
							<view class="contract flex" style="justify-content: space-between;">
								<!-- <view class="contract" v-if="v.state==6||v.state==8||v.state==9">
									¥{{v.contractMoney}}
								</view>
								<view style="color:#13989a ;text-decoration: underline;" v-if="v.state!=0&&v.state!=1&&v.state!=2"
									@click.stop="lookSign(v.signImg||v.inputImg)">
									查看合同
								</view> -->
								<view style="color:#13989a ;text-decoration: underline;" v-if="v.state==10||v.state==9"
									@click.stop="checkAccept(v.assignTaskId,v.state)">
									验收记录
								</view>

							</view>

						</view>
					</view>
				</view>
			</view>
			<!-- 对任务条件搜索 -->
			<!-- <u-picker :show="showRange" :columns="columns" @cancel="showRange=false"
				@confirm="searchHandler"></u-picker> -->
		</view>
		<u-popup :show="provinceShow" mode="left" @close="close">
			<view style="width: 400rpx;">
				<view style="padding-top: 100rpx;font-weight: 700;font-size: 28rpx;">
					请选择店铺所在城市
				</view>
				<view style="overflow-y: scroll;max-height: 80vh;margin:20rpx 0;">
					<u-radio-group iconPlacement="right" v-model="province" placement="column">
						<u-radio :activeColor='color' shape='square'
							:customStyle="{ borderBottom:'1rpx solid #eee',padding:'10px'}"
							v-for="(item, index) in provinceColumns" :key="index" :label="item.name" :name="item.name">
						</u-radio>
					</u-radio-group>
				</view>
				<view style="width:300rpx;margin:0 auto">
					<u-button :color='color' @click="searchProvince">查询</u-button>
				</view>
			</view>
		</u-popup>
		<u-popup :show="viewVideoShow" @close="viewVideoClose" round="10" mode="center">
			<view class="viewVideo">
				<view style="text-align: center;" v-if="currentSerialMsg&&currentSerialMsg.storeName">
					{{currentSerialMsg.storeName}}
				</view>
				<view class="viewVideo_v">
					<view style="width: 100%;height: 100%;" v-if="!videoSrc||videoStatus==-1">
						<u-empty icon="https://renovationcdn.jiachuangnet.com/shipin.png"
							style="width: 100%;height: 100%;" :text="textVideo">
						</u-empty>
					</view>
					<!-- #ifdef MP-WEIXIN -->
					<video v-if="videoSrc&&videoStatus==1&&viewVideoShow"
					 id="myVideo" 
						style="width: 100%;height: 450rpx;border-radius:20rpx;" object-fit='cover' :src='videoSrc'
						:autoplay='true' loop="true" poster></video>
					<!-- #endif -->
					<!-- #ifdef APP -->
					<!-- src='https://assets.mixkit.co/video-templates/41/mixkit-41-360.mp4' -->
					<rayVideo v-if="videoSrc&&videoStatus==1&&viewVideoShow" style="width: 100%;height: 450rpx"
						:src='videoSrc'></rayVideo>
					<!-- <view style="height: 450rpx;width: 100%;" v-html="video"></view>
					-->
					<!-- #endif -->
				</view>
				<view class="video_msg" style="margin-bottom: 20rpx;" v-if="currentSerialMsg">
					<view v-if="currentSerialMsg.videoName">
						{{currentSerialMsg.videoName}}
					</view>
					<view v-if="currentSerialMsg.videoName">
						序列号：{{currentSerialMsg.serialNumber}}
					</view>
					<view>
						状态：{{videoStatus==1?'在线':'不在线'}}
					</view>
				</view>
				<u-button type="primary" text="关闭" @click="viewVideoClose"></u-button>
			</view>
		
		</u-popup>
		<newTabbar v-if="tabbarShow" style="position: fixed;top:0;bottom:0;z-index:10000000" :index='1'
			:tabbarList="tabbarList"></newTabbar>
	</view>
</template>

<script>
	import rayVideo from '@/components/rayVideo/index.vue'
	import newTabbar from '@/components/newTabbar/index.vue'
	let app = getApp();
	export default {
		components: {
			newTabbar,
			rayVideo
		},
		data() {
			return {
				videoSrc: '',
				videoStatus: 0,
				viewVideoShow: false,
				currentSerialMsg: null,
				showRange:false,
				tabbarList: [{
						'text': '首页',
						'path': 'settled',
						'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/indexed.png',
						'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/index.png',
						'name': '首页'
					},
					{
						'text': '我的',
						'path': 'mine',
						'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/mined.png',
						'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/mine.png',
						'name': '我的'
					}
				],
				tabbarShow: false,
				provinceShow: false,
				color: app.globalData.defaultColor,
				statusHeight: app.globalData.statusHeight,
				time1: null,
				taskState: null,
				currentTab: 0,
				searchBarTop: 34, //状态栏高度
				searchBarHeight: 40, //胶囊高度
				total: 1,
				province1: null,
				province: '全国',
				statusList1: [],
				searchKey: null,
				pageNumber: 1,
				pageSize: 20,
				list: [],
				provinceColumns: [{
						name: '全国'
					},
					{
						name: '北京市'
					},
					{
						name: '天津市'
					},
					{
						name: '河北省'
					},
					{
						name: '山西省'
					},
					{
						name: '上海市'
					},
					{
						name: '山东省'
					},
					{
						name: '河南省'
					},
					{
						name: '湖北省'
					},
					{
						name: '湖南省'
					},
					{
						name: '广东省'
					},
					{
						name: '广西壮族自治区'
					},
					{
						name: '海南省'
					},
					{
						name: '重庆市'
					},
					{
						name: '四川省'
					},
					{
						name: '贵州省'
					},
					{
						name: '云南省'
					},
					{
						name: '陕西省'
					},
				],
			}
		},
		onLoad() {
			// #ifdef MP-WEIXIN
			let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
			//获取胶囊对上高度
			this.searchBarTop = menuButtonInfo.top;
			//获取胶囊高度
			this.searchBarHeight = menuButtonInfo.height;
			// #endif
		},
		onShow() {
			const timeFormat = uni.$u.timeFormat;
			this.time1 = timeFormat(new Date(), 'yyyy-mm-dd')
			this.pageNumber = 1

			// switch (this.currentTab) {
			// 	case 0:
			// 		this.taskState = null
			// 		break;
			// 	case 1:
			// 		this.taskState = 0
			// 		break;
			// 	case 2:
			// 		this.taskState = 1
			// 		break;
			// 	case 3:
			// 		this.taskState = 6
			// 		break;
			// 	case 4:
			// 		this.taskState = 7
			// 		break;
			// 	case 5:
			// 		this.taskState = 8
			// 		break;

			// 	case 6:
			// 		this.taskState = 9
			// 		break;
			// 	default:
			// 		this.taskState = null
			// }

			this.list = []
			// this.getBrandHomeCount()
			this.getTaskList()
			const worker = {
				'text': '人才库',
				'path': 'talentPool',
				'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/worked.png',
				'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/worker.png',
				'name': '人才库'
			}
			const shop = {
				'text': '店铺管理',
				'path': 'manageStore',
				'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/jiankonged.png',
				'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/jiankong.png',
				'name': '店铺管理'
			}
			const jianliStoreManage = {
				'text': '店铺管理',
				'path': 'jianliStoreManage',
				'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/jiankonged.png',
				'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/jiankong.png',
				'name': '店铺管理'
			}
			const shopmanager = {
				'text': '店铺管理',
				'path': 'storeManage',
				'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/jiankonged.png',
				'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/jiankong.png',
				'name': '店铺管理'
			}
			uni.getStorage({
				key: 'loginType',
				success: (res) => {
					const loginType = res.data;
					if (loginType === 0 || loginType === 2 || loginType === 7) {
						//  监理 
						if(loginType === 2){
							this.tabbarList.splice(1, 0, jianliStoreManage);
						}else{
							// 超管  品排方
							this.tabbarList.splice(1, 0, shop);
						}
						this.tabbarList.splice(2, 0, worker);
					}
					if (loginType === 1) {
						// 装修公司管理员
						this.tabbarList.splice(1, 0, worker);
					}
					if (loginType === 4) {
						//  加盟商
						this.tabbarList.splice(1, 0, shopmanager);
					}
					if (loginType === 3) {
						// 4项目经理
						this.tabbarList.splice(1, 0, worker);
					}
					this.tabbarShow = true;
				}
			})
		},
		onReachBottom() {
			this.pageNumber++
			this.getTaskList()

		},
		onHide() {
			 
			this.tabbarList =  [{
				 		'text': '首页',
				 		'path': 'settled',
				 		'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/indexed.png',
				 		'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/index.png',
				 		'name': '首页'
				 	},
				 	{
				 		'text': '我的',
				 		'path': 'mine',
				 		'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/mined.png',
				 		'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/mine.png',
				 		'name': '我的'
				 	}
				 ]
			
		},
		onUnload(){
			// this.tabbarList = this.$options.data(this).tabbarList;
		 
			this.tabbarList =  [{
				 		'text': '首页',
				 		'path': 'settled',
				 		'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/indexed.png',
				 		'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/index.png',
				 		'name': '首页'
				 	},
				 	{
				 		'text': '我的',
				 		'path': 'mine',
				 		'activeIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/mined.png',
				 		'inactiveIcon': 'https://renovationcdn.jiachuangnet.com/tabbarIcon/mine.png',
				 		'name': '我的'
				 	}
				 ]
			 
		},
		methods: {
			stopVideo() {
			     const video = uni.createVideoContext("myVideo", this);
			     if (video) {
			       video.pause(); // 暂停视频
			       video.stop(); // 停止播放
			     }
			   },
			viewVideoFn(serialNumber, storeName, videoName) {
				this.currentSerialMsg = {
					serialNumber,
					storeName,
					videoName: '摄像头' + videoName
				}
				this.viewVideoShow = true
				this.getVideoUrl()
			},
			getVideoUrl() {
				uni.$u.http.get('/firmCamera/getLiveAddress', {
					params: {
						serialNumber: this.currentSerialMsg.serialNumber,
					}
				}).then((res) => {
					if (res) {
						this.videoStatus = 1
						this.videoSrc = res
					} else {
						this.videoStatus = -1
						this.textVideo = '摄像头不在线!'
					}
				})
			},
			viewVideoClose() {
				this.viewVideoShow = false
				this.videoStatus = 0
				this.videoSrc = ''
				this.currentSerialMsg = {}
				this.stopVideo()
			},
			toPath(url){
				uni.navigateTo({
					url:`/pages/${url}/index`
				})
			},
			toPathCreateTask(assignTaskId){
				uni.navigateTo({
					url:`/packageB/pages/createTask1/index?assignTaskId=${assignTaskId}`
				})
			},
			gotoCheckAccept(assignTaskId,isCheck){
				let isEchoNewMsg=isCheck==0?false:true
				uni.navigateTo({
					url:`/pages/approval/index?assignTaskId=${assignTaskId}&isEchoNewMsg=${isEchoNewMsg}`
				})
			},
			close() {
				this.provinceShow = false;
			},
			searchHandler() {
				this.pageNumber = 1
				this.getTaskList()
			},
			lookSign(url) {
				if (url) {
					uni.showLoading({
						title: '合同下载中...'
					})
					uni.downloadFile({
						url: `https://${url}`,
						success: function(res) {
							var filePath = res.tempFilePath;
							uni.hideLoading();
							uni.openDocument({
								filePath: filePath,
								showMenu: true,
								success: function(res) {
									console.log('打开文档成功');
								}
							});
						},
						fail: () => {
							uni.hideLoading();
							uni.$u.toast('合同下载失败,请联系管理员 :)');
						}
					});
				} else {
					uni.$u.toast('合同未上传');
				}

			},
			eidtTask(assignTaskId, assignNo) {
				uni.navigateTo({
					url: `/packageB/pages/createTask1/index?assignTaskId=${assignTaskId}&assignNo=${assignNo}`
				})
			},
			visibleTask(assignTaskId) {
				uni.navigateTo({
					url: `/packageB/pages/createTask1/index?assignTaskId=${assignTaskId}`
				})
			},
			checkAccept(assignTaskId,state) {
				let isCheck=state==9?1:0
				uni.navigateTo({
					url: `/pages/checkAccept/index?assignTaskId=${assignTaskId}&isCheck=${isCheck}`
				})
			},
			invite(assignTaskId) {
				uni.navigateTo({
					url: `/packageA/pages/invite/index?assignTaskId=${assignTaskId}`
				})
			},
			async searchProvince() {
				this.pageNumber = 1
				this.province1 = this.province == '全国' ? null : this.province
				this.list = [];
				this.provinceShow = false
				this.getTaskList()
				// this.getBrandHomeCount()
			},
			deChange() {
				uni.$u.debounce(this.change, 1000)

			},
			change() {
				this.pageNumber = 1
				this.list = []
				this.getTaskList()
				// this.getBrandHomeCount()
			},
			publicFn(orderStatus, assignTaskId) {
				uni.$u.http.post('/assign/updateConfirmSendDto', {
					assignTaskId,
					orderStatus //0 待确认 1 取消订单 2 确认订单
				}).then(res => {
					if (res) {
						let title = orderStatus == 1 ? '取消订单成功' : '确认订单成功'
						uni.showToast({
							title: title,
							duration: 1000,
							mask: true,
							complete: () => {
								setTimeout(() => {
									this.pageNumber = 1
									this.list = []
									this.getTaskList()
								}, 1500)
							}
						});
					}
				})
			},
			changeTaskState(e) {
				console.log(e)
				this.currentTab = e.index
				this.taskState = e.value
				this.list = []
				this.pageNumber = 1
				this.getTaskList()
				// this.getBrandHomeCount()
			},
			getBrandHomeCount() {
				uni.$u.http.get('/assign/getBrandHomeCount', {
					params: {
						address: this.province1 == '全国' ? '' : this.province1,
						storeName: this.searchKey
					}
				}).then(res => {
					this.statusList1 = [{
							name: '全部',
							value: null,
							badge: {
								value: res.totalCount
							}
						},
						{
							name: '待确认',
							value: 0,
							badge: {
								value: res.confirmedCount
							}
						},
						{
							name: '待开始',
							value: 1,
							badge: {
								value: res.pendingStartCount
							}
						},
						{
							name: '进行中',
							value: 6,
							badge: {
								value: res.inProgressCount
							}
						},
						{
							name: '已逾期',
							value: 7,
							badge: {
								value: res.overdueCount
							}
						},
						{
							name: '待验收',
							value: 8,
							badge: {
								value: res.completedCount
							}
						},
						{
							name: '已完工',
							value: 9,
							badge: {
								value: res.finishedCount
							}
						},

					]
				})
			},
			taskProgress(assignTaskId,brandPartyId) {
				uni.navigateTo({
					url: `/pages/taskAllocation/index?assignTaskId=${assignTaskId}&brandPartyId=${brandPartyId}`
				})
			},
			getTaskList() {
				this.status = 'loading'
				const params = {
					pageNumber: this.pageNumber,
					pageSize: this.pageSize,
					address: this.province1 == '全国' ? '' : this.province1,
					storeName: this.searchKey,
				}

				uni.$u.http.get('/evaluate/getSuperVisionVoList', {
					params
				}).then(res => {
					if (res) {
						this.list = [...this.list, ...res.data]
					}
				})



				// this.list=[
				// 	{
				// 		assignName: "衡阳五一大市场店1",
				// 		assignTaskId: 167,
				// 		contractId: null,
				// 		imgUrl: null,
				// 		inputImg: null,
				// 		progress: "0.0%",
				// 		serialNumber: null,
				// 		serialNumberStr: null,
				// 		signImg: null,
				// 		startTime: '2025-03-02',
				// 		state: 0 //0待确认订单 
				// 	},
				// 	{
				// 		assignName: "衡阳五一大市场店2",
				// 		assignTaskId: 167,
				// 		contractId: null,
				// 		imgUrl: null,
				// 		inputImg: null,
				// 		progress: "0.0%",
				// 		serialNumber: null,
				// 		serialNumberStr: null,
				// 		signImg: null,
				// 		startTime: '2025-03-02',
				// 		state: 1 //
				// 	},
				// 	{
				// 		assignName: "衡阳五一大市场店3",
				// 		assignTaskId: 167,
				// 		contractId: null,
				// 		imgUrl: null,
				// 		inputImg: null,
				// 		progress: "0.0%",
				// 		serialNumber: null,
				// 		serialNumberStr: null,
				// 		signImg: null,
				// 		startTime: '2025-03-02',
				// 		state: 2 //0待确认订单 
				// 	},
				// 	{
				// 		assignName: "衡阳五一大市场店4",
				// 		assignTaskId: 167,
				// 		contractId: null,
				// 		imgUrl: null,
				// 		inputImg: null,
				// 		progress: "0.0%",
				// 		serialNumber: null,
				// 		serialNumberStr: null,
				// 		signImg: null,
				// 		startTime: '2025-03-02',
				// 		state: 3 //0待确认订单 
				// 	},
				// 	{
				// 		assignName: "衡阳五一大市场店5",
				// 		assignTaskId: 167,
				// 		contractId: null,
				// 		imgUrl: null,
				// 		inputImg: null,
				// 		progress: "0.0%",
				// 		serialNumber: null,
				// 		serialNumberStr: null,
				// 		signImg: null,
				// 		startTime: '2025-03-02',
				// 		state: 4 //0待确认订单 
				// 	}
				// ]




				// /assign/getCompanyHomeVo
				// uni.$u.http.get('/assign/getCompanyHomeVo', {
				// 	params
				// }).then(async res => {
				// 	if(res){
				// 		let tampList= res.data.map(item=>{
				// 			item.serialNumber=item.serialNumber||[]
				// 			return item
				// 		})
				// 		this.list=[...this.list,...tampList]
				// 		this.total=res.total

				// 	}
				// 	uni.stopPullDownRefresh()
				// }).then(()=>{
				// 	uni.$u.http.get('/assign/getCompanyHomeCount', {
				// 		params:{
				// 			address:this.province1,
				// 			storeName:this.searchKey
				// 		}
				// 	}).then(res=>{
				// 		this.statusList1 = [{
				// 				name: '全部',
				// 				value: null,
				// 				badge: {
				// 					value: res.totalCount
				// 				}
				// 			},
				// 			{
				// 				name: '待开始',
				// 				value: 0,
				// 				badge: {
				// 					value: res.pendingStartCount
				// 				}
				// 			},
				// 			{
				// 				name: '进行中',
				// 				value: 1,
				// 				badge: {
				// 					value: res.inProgressCount
				// 				}
				// 			},
				// 			{
				// 				name: '已逾期',
				// 				value: 2,
				// 				badge: {
				// 					value: res.overdueCount
				// 				}
				// 			},
				// 			{
				// 				name: '已完成',
				// 				value: 3,
				// 				badge: {
				// 					value: res.completedCount
				// 				}
				// 			},

				// 		]
				// 	})



				// })
			},
		}
	}
</script>

<style>
	page {
		background: #f8f8f8;
		font-size: 24rpx;
	}
</style>
<style lang="scss" scoped>
	.stateTag1{
		position: absolute;
		top: 0;
		left: 0;
		background-color: #4d90fe;
		color: white;
		font-size: 24rpx;
		padding: 5rpx 10rpx;
		border-bottom-right-radius: 20rpx;
		border-top-left-radius: 20rpx;
	}
	.stateTag3{
		position: absolute;
		top: 0;
		left: 0;
		background-color: #80c342;
		color: white;
		font-size: 24rpx;
		padding: 5rpx 10rpx;
		border-bottom-right-radius: 20rpx;
		border-top-left-radius: 20rpx;
	}
	.stateTag2{
		position: absolute;
		top: 0;
		left: 0;
		background-color: #ffc700;
		color: white;
		font-size: 24rpx;
		padding: 5rpx 10rpx;
		border-bottom-right-radius: 20rpx;
		border-top-left-radius: 20rpx;
	}
	.viewVideo {
		width: 95vw;
		font-size: 28rpx;
		font-weight: 700;
		padding: 20rpx;
		box-sizing: border-box;

		.viewVideo_v {
			font-size: 28rpx;
			font-weight: 700;
		}
	}

	.uploadForm {
		max-height: 60vh;
		overflow-y: auto;
		padding: 50rpx 15rpx;
	}

	.upload_title {
		font-weight: 700;
		display: flex;
		justify-content: center;
	}

	// ::v-deep.company{
	// 	.u-tabs__wrapper__nav__item{
	// 		padding: 0 !important;
	// 	}
	// }
	.overdueForm {
		padding: 100rpx 30rpx 50rpx 30rpx;
	}

	.btn111 {
		width: 160rpx;
		line-height: 64rpx;
		border-radius: 24rpx;
		background-color: #13989a;
		font-weight: 500;
		color: #fff;
		text-align: center;
		margin-left: 200rpx;
	}

	.container {
		width: 700rpx;
		padding: 0 25rpx;
		position: absolute;
		top: 370rpx;
		left: 0;
		z-index: 10
	}

	.bg {
		width: 750rpx;
		height: 430rpx;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 1;
	}

	.starTechnician {
		padding: 20rpx;
		width: calc(100% - 40rpx);
		margin: 20rpx 0;
		// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border-radius: 10rpx;
		background-color: white;

	}



	.textTitle {
		font-size: 28rpx;
		margin-bottom: 20rpx;
		font-weight: 700;
		color: #1E272E;
	}

	.lineTitle {
		padding-bottom: 20rpx;
		font-size: 32rpx;
		font-weight: 700;
		display: flex;
		justify-content: space-between;
		border-bottom: 1rpx solid #eee;
	}

	.starList {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		margin-top: 20rpx;
	}

	.searchBar {
		position: absolute;
		left: 25rpx;
		width: 700rpx;
		z-index: 10;
		display: flex;
		align-items: center;

	}

	.storeListItem {
		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
		border-radius: 10rpx;
		width: calc(100% - 40rpx);
		padding: 20rpx;
		margin-top: 30rpx;
		display: flex;
		// align-items: center;
		background-color: white;
	}

	.textLine {
		padding: 40rpx 20rpx;
		font-size: 24rpx;
		margin-bottom: 22rpx;
		background: linear-gradient(-90deg, #DCF3F5, #EBF4F5);
		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
		border-radius: 20rpx;
		color: #1E272E;
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: center;
	}

	.itemContent {
		background: white !important;
		padding: 40rpx 30rpx;
		// box-shadow: none !important;
	}

	.todayTask {
		font-weight: bold;
		font-size: 32rpx;
		color: #1E272E;
		margin-right: 10rpx
	}

	.workerSearch {
		border-radius: 40rpx;
		display: flex;
		align-items: center;
		padding-left: 22rpx;
		width: 496rpx;
		height: 78rpx;
		background-color: white;
		opacity: 0.9;
	}

	// .worker /deep/ .u-tabs__wrapper__nav__item {
	// 	padding: 0 !important;
	// }

	.province {
		font-size: 30rpx;
		margin: 0 20rpx 0 10rpx;
		width: 50rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
		word-break: break-all;
	}

	.listContent {
		width: 700rpx;
	}

	.listItem {
		background-color: white;
		height: 257rpx;
		padding: 20rpx 30rpx;
		border-radius: 20rpx;
		margin-top: 20rpx;
		display: flex;
		align-items: flex-start;
		overflow: hidden;
		position: relative;
	}

	.stateTag {
		position: absolute;
		top: 0;
		right: 0;
		background-color: #13989A;
		color: white;
		padding: 10rpx 20rpx;
		border-bottom-left-radius: 20rpx;
	}

	.btn_wrapper {
		display: flex;
		width: 47%;
		position: absolute;
		bottom: 20rpx;
		right: 20rpx;
		justify-content: end;
	}

	.btn11 {
		width: 150rpx;
		height: 60rpx;
		border-radius: 30rpx;
		text-align: center;
		line-height: 60rpx;
		font-weight: 500;
		font-size: 30rpx;
		margin-right: 20rpx;
	}

	.btn {
		width: 150rpx;
		height: 60rpx;
		border-radius: 30rpx;
		text-align: center;
		line-height: 60rpx;
		position: absolute;
		bottom: 10rpx;
		right: 20rpx;
		font-weight: 500;
		font-size: 30rpx;

	}

	.stateBtn {
		background: #E7F4F5;
		color: #13989a;
	}

	.cameraBox {
		position: absolute;
		bottom: 10px;
		left: 10px;
	}
</style>